<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width: 400px;
            height: 400px;
            margin: auto;
            box-shadow: 0 0 2px 1px rgb(0, 0, 0,20%);
        }
        .ipt{
            height: 50px;
            border-bottom: 1px solid;
        }
    </style>
</head>
<body>
   <div class="container">
       <div class="ipt">
        <input>
       </div>    
       <div>
        <p></p>
       </div>
</div>
<script>
     let ipt = document.getElementsByTagName('input')[0];
     ipt.onkeyup = function(){
         if(onkeyup == 13){
            alert('nih')
         }
     }
</script>
</body>
</html>